package adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.luck.picture.lib.entity.LocalMedia;

import java.util.List;

import bean.ItemBean;
import student.andlei.com.student.R;
import utils.GlideUtils;
import utils.Logger;

public class ImageAdapter extends BaseQuickAdapter<LocalMedia,BaseViewHolder>{
    private Context context;
    public ImageAdapter(Context context, int layoutResId, @Nullable List<LocalMedia> data) {
        super(layoutResId, data);
        this.context =context;
    }

    @Override
    protected void convert(BaseViewHolder helper, LocalMedia item) {
        Logger.i("convert--",""+item.getPath());
        GlideUtils.loadImageView(context,item.getPath(), (ImageView) helper.getView(R.id.img_));
    }
}
